// Code generated by protoc-gen-validate. DO NOT EDIT.
// source: ozonmp/act_device_api/v1/act_device_api.proto

package act_device_api

import (
	"bytes"
	"errors"
	"fmt"
	"net"
	"net/mail"
	"net/url"
	"regexp"
	"strings"
	"time"
	"unicode/utf8"

	"google.golang.org/protobuf/types/known/anypb"
)

// ensure the imports are used
var (
	_ = bytes.MinRead
	_ = errors.New("")
	_ = fmt.Print
	_ = utf8.UTFMax
	_ = (*regexp.Regexp)(nil)
	_ = (*strings.Reader)(nil)
	_ = net.IPv4len
	_ = time.Duration(0)
	_ = (*url.URL)(nil)
	_ = (*mail.Address)(nil)
	_ = anypb.Any{}
)

// Validate checks the field values on AckNotificationV1Request with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *AckNotificationV1Request) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for NotificationId

	return nil
}

// AckNotificationV1RequestValidationError is the validation error returned by
// AckNotificationV1Request.Validate if the designated constraints aren't met.
type AckNotificationV1RequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AckNotificationV1RequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AckNotificationV1RequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AckNotificationV1RequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AckNotificationV1RequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AckNotificationV1RequestValidationError) ErrorName() string {
	return "AckNotificationV1RequestValidationError"
}

// Error satisfies the builtin error interface
func (e AckNotificationV1RequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sAckNotificationV1Request.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AckNotificationV1RequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AckNotificationV1RequestValidationError{}

// Validate checks the field values on AckNotificationV1Response with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *AckNotificationV1Response) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Success

	return nil
}

// AckNotificationV1ResponseValidationError is the validation error returned by
// AckNotificationV1Response.Validate if the designated constraints aren't met.
type AckNotificationV1ResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e AckNotificationV1ResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e AckNotificationV1ResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e AckNotificationV1ResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e AckNotificationV1ResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e AckNotificationV1ResponseValidationError) ErrorName() string {
	return "AckNotificationV1ResponseValidationError"
}

// Error satisfies the builtin error interface
func (e AckNotificationV1ResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sAckNotificationV1Response.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = AckNotificationV1ResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = AckNotificationV1ResponseValidationError{}

// Validate checks the field values on SubscribeNotificationRequest with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *SubscribeNotificationRequest) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for DeviceId

	return nil
}

// SubscribeNotificationRequestValidationError is the validation error returned
// by SubscribeNotificationRequest.Validate if the designated constraints
// aren't met.
type SubscribeNotificationRequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SubscribeNotificationRequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SubscribeNotificationRequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SubscribeNotificationRequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SubscribeNotificationRequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SubscribeNotificationRequestValidationError) ErrorName() string {
	return "SubscribeNotificationRequestValidationError"
}

// Error satisfies the builtin error interface
func (e SubscribeNotificationRequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSubscribeNotificationRequest.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SubscribeNotificationRequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SubscribeNotificationRequestValidationError{}

// Validate checks the field values on GetNotificationV1Request with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *GetNotificationV1Request) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for DeviceId

	return nil
}

// GetNotificationV1RequestValidationError is the validation error returned by
// GetNotificationV1Request.Validate if the designated constraints aren't met.
type GetNotificationV1RequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetNotificationV1RequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetNotificationV1RequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetNotificationV1RequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetNotificationV1RequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetNotificationV1RequestValidationError) ErrorName() string {
	return "GetNotificationV1RequestValidationError"
}

// Error satisfies the builtin error interface
func (e GetNotificationV1RequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetNotificationV1Request.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetNotificationV1RequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetNotificationV1RequestValidationError{}

// Validate checks the field values on GetNotificationV1Response with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *GetNotificationV1Response) Validate() error {
	if m == nil {
		return nil
	}

	for idx, item := range m.GetNotification() {
		_, _ = idx, item

		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return GetNotificationV1ResponseValidationError{
					field:  fmt.Sprintf("Notification[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	return nil
}

// GetNotificationV1ResponseValidationError is the validation error returned by
// GetNotificationV1Response.Validate if the designated constraints aren't met.
type GetNotificationV1ResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e GetNotificationV1ResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e GetNotificationV1ResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e GetNotificationV1ResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e GetNotificationV1ResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e GetNotificationV1ResponseValidationError) ErrorName() string {
	return "GetNotificationV1ResponseValidationError"
}

// Error satisfies the builtin error interface
func (e GetNotificationV1ResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sGetNotificationV1Response.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = GetNotificationV1ResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = GetNotificationV1ResponseValidationError{}

// Validate checks the field values on SendNotificationV1Request with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *SendNotificationV1Request) Validate() error {
	if m == nil {
		return nil
	}

	if v, ok := interface{}(m.GetNotification()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return SendNotificationV1RequestValidationError{
				field:  "Notification",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	return nil
}

// SendNotificationV1RequestValidationError is the validation error returned by
// SendNotificationV1Request.Validate if the designated constraints aren't met.
type SendNotificationV1RequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SendNotificationV1RequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SendNotificationV1RequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SendNotificationV1RequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SendNotificationV1RequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SendNotificationV1RequestValidationError) ErrorName() string {
	return "SendNotificationV1RequestValidationError"
}

// Error satisfies the builtin error interface
func (e SendNotificationV1RequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSendNotificationV1Request.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SendNotificationV1RequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SendNotificationV1RequestValidationError{}

// Validate checks the field values on UserNotification with the rules defined
// in the proto definition for this message. If any rules are violated, an
// error is returned.
func (m *UserNotification) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for NotificationId

	// no validation rules for Message

	return nil
}

// UserNotificationValidationError is the validation error returned by
// UserNotification.Validate if the designated constraints aren't met.
type UserNotificationValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e UserNotificationValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e UserNotificationValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e UserNotificationValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e UserNotificationValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e UserNotificationValidationError) ErrorName() string { return "UserNotificationValidationError" }

// Error satisfies the builtin error interface
func (e UserNotificationValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sUserNotification.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = UserNotificationValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = UserNotificationValidationError{}

// Validate checks the field values on Notification with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *Notification) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for NotificationId

	// no validation rules for DeviceId

	// no validation rules for Username

	// no validation rules for Message

	// no validation rules for Lang

	// no validation rules for NotificationStatus

	return nil
}

// NotificationValidationError is the validation error returned by
// Notification.Validate if the designated constraints aren't met.
type NotificationValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e NotificationValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e NotificationValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e NotificationValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e NotificationValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e NotificationValidationError) ErrorName() string { return "NotificationValidationError" }

// Error satisfies the builtin error interface
func (e NotificationValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sNotification.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = NotificationValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = NotificationValidationError{}

// Validate checks the field values on SendNotificationV1Response with the
// rules defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *SendNotificationV1Response) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for NotificationId

	return nil
}

// SendNotificationV1ResponseValidationError is the validation error returned
// by SendNotificationV1Response.Validate if the designated constraints aren't met.
type SendNotificationV1ResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e SendNotificationV1ResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e SendNotificationV1ResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e SendNotificationV1ResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e SendNotificationV1ResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e SendNotificationV1ResponseValidationError) ErrorName() string {
	return "SendNotificationV1ResponseValidationError"
}

// Error satisfies the builtin error interface
func (e SendNotificationV1ResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sSendNotificationV1Response.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = SendNotificationV1ResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = SendNotificationV1ResponseValidationError{}

// Validate checks the field values on Device with the rules defined in the
// proto definition for this message. If any rules are violated, an error is returned.
func (m *Device) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Id

	// no validation rules for Platform

	// no validation rules for UserId

	if v, ok := interface{}(m.GetEnteredAt()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DeviceValidationError{
				field:  "EnteredAt",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	return nil
}

// DeviceValidationError is the validation error returned by Device.Validate if
// the designated constraints aren't met.
type DeviceValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DeviceValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DeviceValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DeviceValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DeviceValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DeviceValidationError) ErrorName() string { return "DeviceValidationError" }

// Error satisfies the builtin error interface
func (e DeviceValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sDevice.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DeviceValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DeviceValidationError{}

// Validate checks the field values on CreateDeviceV1Request with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *CreateDeviceV1Request) Validate() error {
	if m == nil {
		return nil
	}

	if utf8.RuneCountInString(m.GetPlatform()) < 1 {
		return CreateDeviceV1RequestValidationError{
			field:  "Platform",
			reason: "value length must be at least 1 runes",
		}
	}

	if m.GetUserId() <= 0 {
		return CreateDeviceV1RequestValidationError{
			field:  "UserId",
			reason: "value must be greater than 0",
		}
	}

	return nil
}

// CreateDeviceV1RequestValidationError is the validation error returned by
// CreateDeviceV1Request.Validate if the designated constraints aren't met.
type CreateDeviceV1RequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateDeviceV1RequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateDeviceV1RequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateDeviceV1RequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateDeviceV1RequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateDeviceV1RequestValidationError) ErrorName() string {
	return "CreateDeviceV1RequestValidationError"
}

// Error satisfies the builtin error interface
func (e CreateDeviceV1RequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sCreateDeviceV1Request.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateDeviceV1RequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateDeviceV1RequestValidationError{}

// Validate checks the field values on CreateDeviceV1Response with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *CreateDeviceV1Response) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for DeviceId

	return nil
}

// CreateDeviceV1ResponseValidationError is the validation error returned by
// CreateDeviceV1Response.Validate if the designated constraints aren't met.
type CreateDeviceV1ResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e CreateDeviceV1ResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e CreateDeviceV1ResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e CreateDeviceV1ResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e CreateDeviceV1ResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e CreateDeviceV1ResponseValidationError) ErrorName() string {
	return "CreateDeviceV1ResponseValidationError"
}

// Error satisfies the builtin error interface
func (e CreateDeviceV1ResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sCreateDeviceV1Response.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = CreateDeviceV1ResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = CreateDeviceV1ResponseValidationError{}

// Validate checks the field values on DescribeDeviceV1Request with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *DescribeDeviceV1Request) Validate() error {
	if m == nil {
		return nil
	}

	if m.GetDeviceId() <= 0 {
		return DescribeDeviceV1RequestValidationError{
			field:  "DeviceId",
			reason: "value must be greater than 0",
		}
	}

	return nil
}

// DescribeDeviceV1RequestValidationError is the validation error returned by
// DescribeDeviceV1Request.Validate if the designated constraints aren't met.
type DescribeDeviceV1RequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DescribeDeviceV1RequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DescribeDeviceV1RequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DescribeDeviceV1RequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DescribeDeviceV1RequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DescribeDeviceV1RequestValidationError) ErrorName() string {
	return "DescribeDeviceV1RequestValidationError"
}

// Error satisfies the builtin error interface
func (e DescribeDeviceV1RequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sDescribeDeviceV1Request.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DescribeDeviceV1RequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DescribeDeviceV1RequestValidationError{}

// Validate checks the field values on DescribeDeviceV1Response with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *DescribeDeviceV1Response) Validate() error {
	if m == nil {
		return nil
	}

	if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DescribeDeviceV1ResponseValidationError{
				field:  "Value",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	return nil
}

// DescribeDeviceV1ResponseValidationError is the validation error returned by
// DescribeDeviceV1Response.Validate if the designated constraints aren't met.
type DescribeDeviceV1ResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DescribeDeviceV1ResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DescribeDeviceV1ResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DescribeDeviceV1ResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DescribeDeviceV1ResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DescribeDeviceV1ResponseValidationError) ErrorName() string {
	return "DescribeDeviceV1ResponseValidationError"
}

// Error satisfies the builtin error interface
func (e DescribeDeviceV1ResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sDescribeDeviceV1Response.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DescribeDeviceV1ResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DescribeDeviceV1ResponseValidationError{}

// Validate checks the field values on ListDevicesV1Request with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *ListDevicesV1Request) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Page

	// no validation rules for PerPage

	return nil
}

// ListDevicesV1RequestValidationError is the validation error returned by
// ListDevicesV1Request.Validate if the designated constraints aren't met.
type ListDevicesV1RequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListDevicesV1RequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListDevicesV1RequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListDevicesV1RequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListDevicesV1RequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListDevicesV1RequestValidationError) ErrorName() string {
	return "ListDevicesV1RequestValidationError"
}

// Error satisfies the builtin error interface
func (e ListDevicesV1RequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sListDevicesV1Request.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListDevicesV1RequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListDevicesV1RequestValidationError{}

// Validate checks the field values on ListDevicesV1Response with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *ListDevicesV1Response) Validate() error {
	if m == nil {
		return nil
	}

	for idx, item := range m.GetItems() {
		_, _ = idx, item

		if v, ok := interface{}(item).(interface{ Validate() error }); ok {
			if err := v.Validate(); err != nil {
				return ListDevicesV1ResponseValidationError{
					field:  fmt.Sprintf("Items[%v]", idx),
					reason: "embedded message failed validation",
					cause:  err,
				}
			}
		}

	}

	return nil
}

// ListDevicesV1ResponseValidationError is the validation error returned by
// ListDevicesV1Response.Validate if the designated constraints aren't met.
type ListDevicesV1ResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e ListDevicesV1ResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e ListDevicesV1ResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e ListDevicesV1ResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e ListDevicesV1ResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e ListDevicesV1ResponseValidationError) ErrorName() string {
	return "ListDevicesV1ResponseValidationError"
}

// Error satisfies the builtin error interface
func (e ListDevicesV1ResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sListDevicesV1Response.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = ListDevicesV1ResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = ListDevicesV1ResponseValidationError{}

// Validate checks the field values on UpdateDeviceV1Request with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UpdateDeviceV1Request) Validate() error {
	if m == nil {
		return nil
	}

	if m.GetDeviceId() <= 0 {
		return UpdateDeviceV1RequestValidationError{
			field:  "DeviceId",
			reason: "value must be greater than 0",
		}
	}

	if utf8.RuneCountInString(m.GetPlatform()) < 1 {
		return UpdateDeviceV1RequestValidationError{
			field:  "Platform",
			reason: "value length must be at least 1 runes",
		}
	}

	if m.GetUserId() <= 0 {
		return UpdateDeviceV1RequestValidationError{
			field:  "UserId",
			reason: "value must be greater than 0",
		}
	}

	return nil
}

// UpdateDeviceV1RequestValidationError is the validation error returned by
// UpdateDeviceV1Request.Validate if the designated constraints aren't met.
type UpdateDeviceV1RequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e UpdateDeviceV1RequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e UpdateDeviceV1RequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e UpdateDeviceV1RequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e UpdateDeviceV1RequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e UpdateDeviceV1RequestValidationError) ErrorName() string {
	return "UpdateDeviceV1RequestValidationError"
}

// Error satisfies the builtin error interface
func (e UpdateDeviceV1RequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sUpdateDeviceV1Request.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = UpdateDeviceV1RequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = UpdateDeviceV1RequestValidationError{}

// Validate checks the field values on UpdateDeviceV1Response with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *UpdateDeviceV1Response) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Success

	return nil
}

// UpdateDeviceV1ResponseValidationError is the validation error returned by
// UpdateDeviceV1Response.Validate if the designated constraints aren't met.
type UpdateDeviceV1ResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e UpdateDeviceV1ResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e UpdateDeviceV1ResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e UpdateDeviceV1ResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e UpdateDeviceV1ResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e UpdateDeviceV1ResponseValidationError) ErrorName() string {
	return "UpdateDeviceV1ResponseValidationError"
}

// Error satisfies the builtin error interface
func (e UpdateDeviceV1ResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sUpdateDeviceV1Response.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = UpdateDeviceV1ResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = UpdateDeviceV1ResponseValidationError{}

// Validate checks the field values on RemoveDeviceV1Request with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *RemoveDeviceV1Request) Validate() error {
	if m == nil {
		return nil
	}

	if m.GetDeviceId() <= 0 {
		return RemoveDeviceV1RequestValidationError{
			field:  "DeviceId",
			reason: "value must be greater than 0",
		}
	}

	return nil
}

// RemoveDeviceV1RequestValidationError is the validation error returned by
// RemoveDeviceV1Request.Validate if the designated constraints aren't met.
type RemoveDeviceV1RequestValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RemoveDeviceV1RequestValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RemoveDeviceV1RequestValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RemoveDeviceV1RequestValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RemoveDeviceV1RequestValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RemoveDeviceV1RequestValidationError) ErrorName() string {
	return "RemoveDeviceV1RequestValidationError"
}

// Error satisfies the builtin error interface
func (e RemoveDeviceV1RequestValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sRemoveDeviceV1Request.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RemoveDeviceV1RequestValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RemoveDeviceV1RequestValidationError{}

// Validate checks the field values on RemoveDeviceV1Response with the rules
// defined in the proto definition for this message. If any rules are
// violated, an error is returned.
func (m *RemoveDeviceV1Response) Validate() error {
	if m == nil {
		return nil
	}

	// no validation rules for Found

	return nil
}

// RemoveDeviceV1ResponseValidationError is the validation error returned by
// RemoveDeviceV1Response.Validate if the designated constraints aren't met.
type RemoveDeviceV1ResponseValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e RemoveDeviceV1ResponseValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e RemoveDeviceV1ResponseValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e RemoveDeviceV1ResponseValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e RemoveDeviceV1ResponseValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e RemoveDeviceV1ResponseValidationError) ErrorName() string {
	return "RemoveDeviceV1ResponseValidationError"
}

// Error satisfies the builtin error interface
func (e RemoveDeviceV1ResponseValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sRemoveDeviceV1Response.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = RemoveDeviceV1ResponseValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = RemoveDeviceV1ResponseValidationError{}

// Validate checks the field values on DeviceEvent with the rules defined in
// the proto definition for this message. If any rules are violated, an error
// is returned.
func (m *DeviceEvent) Validate() error {
	if m == nil {
		return nil
	}

	if m.GetId() <= 0 {
		return DeviceEventValidationError{
			field:  "Id",
			reason: "value must be greater than 0",
		}
	}

	if m.GetDeviceId() <= 0 {
		return DeviceEventValidationError{
			field:  "DeviceId",
			reason: "value must be greater than 0",
		}
	}

	if m.GetType() <= 0 {
		return DeviceEventValidationError{
			field:  "Type",
			reason: "value must be greater than 0",
		}
	}

	if m.GetStatus() <= 0 {
		return DeviceEventValidationError{
			field:  "Status",
			reason: "value must be greater than 0",
		}
	}

	if v, ok := interface{}(m.GetPayload()).(interface{ Validate() error }); ok {
		if err := v.Validate(); err != nil {
			return DeviceEventValidationError{
				field:  "Payload",
				reason: "embedded message failed validation",
				cause:  err,
			}
		}
	}

	return nil
}

// DeviceEventValidationError is the validation error returned by
// DeviceEvent.Validate if the designated constraints aren't met.
type DeviceEventValidationError struct {
	field  string
	reason string
	cause  error
	key    bool
}

// Field function returns field value.
func (e DeviceEventValidationError) Field() string { return e.field }

// Reason function returns reason value.
func (e DeviceEventValidationError) Reason() string { return e.reason }

// Cause function returns cause value.
func (e DeviceEventValidationError) Cause() error { return e.cause }

// Key function returns key value.
func (e DeviceEventValidationError) Key() bool { return e.key }

// ErrorName returns error name.
func (e DeviceEventValidationError) ErrorName() string { return "DeviceEventValidationError" }

// Error satisfies the builtin error interface
func (e DeviceEventValidationError) Error() string {
	cause := ""
	if e.cause != nil {
		cause = fmt.Sprintf(" | caused by: %v", e.cause)
	}

	key := ""
	if e.key {
		key = "key for "
	}

	return fmt.Sprintf(
		"invalid %sDeviceEvent.%s: %s%s",
		key,
		e.field,
		e.reason,
		cause)
}

var _ error = DeviceEventValidationError{}

var _ interface {
	Field() string
	Reason() string
	Key() bool
	Cause() error
	ErrorName() string
} = DeviceEventValidationError{}
